clear;

hi=[47.85 47.83 47.95 48.11 48.30 48.17 48.6 48.33 48.4 48.55 48.45 48.70 48.72 48.90 48.87 48.82 49.05 49.20 49.35]';
lo=[47.48 47.55 47.32 47.25 47.77 47.91 47.9 47.74 48.1 48.06 48.07 47.79 48.14 48.39 48.37 48.24 48.64 48.94 48.86]';  

sar=roundoff(parabolic(hi, lo,  0.02, 0.2), 2);

assert(sar(5)==47.25 &amp;&amp; sar(end)==48.28);

hi=[46.44 46.47 46.50 46.59 46.55 46.30 45.43 44.55 44.84 44.80 44.38 43.97 43.23 43.73 43.92 43.61 42.97 43.13 43.46]';
lo=[45.56 46.17 45.60 45.90 45.38 45.25 43.99 44.07 44.00 43.96 43.27 42.58 42.83 42.98 43.37 42.57 42.07 42.59 42.71]';

sar=roundoff(parabolic(hi, lo,  0.02, 0.2), 2);

assert(sar(5)==46.59 &amp;&amp; sar(end)==43.56);